function tax(s){
    if(s<5000){return"不用交税"}
    if(s>8000){return(s-8000)*0.1+150;}
    else{return(s-5000)*0.05;}
}
console.log(tax(8000));